import request from '@/utils/request'

// 查询轮播管理列表
export function listBanner(query) {
    return request({
        url: '/business/banner/list',
        method: 'get',
        params: query
    })
}

// 查询轮播管理详细
export function getBanner(bannerId) {
    return request({
        url: '/business/banner/' + bannerId,
        method: 'get'
    })
}

// 新增轮播管理
export function addBanner(data) {
    return request({
        url: '/business/banner',
        method: 'post',
        data: data
    })
}

// 修改轮播管理
export function updateBanner(data) {
    return request({
        url: '/business/banner',
        method: 'put',
        data: data
    })
}

// 删除轮播管理
export function delBanner(bannerId) {
    return request({
        url: '/business/banner/' + bannerId,
        method: 'delete'
    })
}

// 文件上传
export function uploadBanner(data) {
    return request({
        url: '/business/sysFileInfo/upload',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}
